package com.sh.bean;

public class Computer {
    private String cpu;
    private int memory;
    private Phone phone;

    public Computer() {}

    public Computer(String cpu, int memory) {
        this.cpu = cpu;
        this.memory = memory;
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public int getMemory() {
        return memory;
    }

    public void setMemory(int memory) {
        this.memory = memory;
    }

    public Phone getPhone() {
        return phone;
    }

    public void setPhone(Phone phone) {
        this.phone = phone;
    }

    public void simulatePhoneUsage() {
        System.out.println("💻 配置：" + cpu + " + " + memory + "GB 内存");
        phone.useCamera();
    }
}
